<?php $this->pageTitle=$model->title.' | Mobile TV'; ?>
<div class="post-head">
  	<?php echo CHtml::link($model->category[0]["name"],array('/category/view', 'id'=>$model->category[0]["id"]),array('title'=>$model->category[0]["name"],'class'=>'back')); ?>
    <h1><?php echo $model->title;?></h1>
    <p class="meta"><?php echo $model->en_title;?></p>
</div>
<?php
	if(isset(Yii::app()->user->id)){
		$trans=Transpackage::model()->findByAttributes(array('mid'=>Yii::app()->user->id),array('order'=>'t.id DESC'));
		if(isset($trans) && strtotime($trans->enddate) >=  strtotime(date('Y-m-d H:i'))){
			$this->widget('ext.film_player.film_player',array(
				'dataProviderE'=>$dataProviderE,
			));
		}
		else{
			$this->widget('ext.film_player_free.film_player',array(
				'model'=>$model,
				'dataProviderE'=>$dataProviderE,
			));
		}
	}
	else{
		$this->widget('ext.film_player_free.film_player',array(
			'model'=>$model,
			'dataProviderE'=>$dataProviderE,
		));
	}
/*if($model->retail[0]['price']!=0){
	if(isset(Yii::app()->user->id)){
		$trans=Transaction::model()->findByAttributes(array('fid'=>$model->id,'mid'=>Yii::app()->user->id));
		if(isset($trans)){
			$this->widget('ext.film_player.film_player',array(
				'dataProviderE'=>$dataProviderE,
			));
		}
		else{
			$this->widget('ext.film_player_free.film_player',array(
				'model'=>$model,
				'dataProviderE'=>$dataProviderE,
			));
		}
	}
	else{
		$this->widget('ext.film_player_free.film_player',array(
			'model'=>$model,
			'dataProviderE'=>$dataProviderE,
		));
	}
}
else{
	$this->widget('ext.film_player.film_player',array(
		'dataProviderE'=>$dataProviderE,
	));
}*/
?>
<div class="title_mod">
    <?php echo CHtml::link('
        <span class="mleft"></span>
        <span class="mcenter">Film liên quan</span>
        <span class="mright"></span>',
        array('film/new'), array('title' => 'Film liên quan')); ?>
</div>
<?php 
$this->widget('zii.widgets.CListView', array(
    'dataProvider'=>$dataProviderF,
    'itemView'=>'_view',
	'summaryText'=>'',
	'pager' => array(
            'firstPageLabel'=>'Đầu',
            'prevPageLabel'=>'Trước',
            'nextPageLabel'=>'Tiếp',
            'lastPageLabel'=>'Cuối',
            'maxButtonCount'=>5,
     ),
));
?>
